<template>
  <div>
    <el-dialog v-bind="$attrs" v-on="$listeners" @open="onOpen" @close="onClose" title="Dialog Titile">
      <el-form ref="formRef" :model="form" :rules="rules" size="small" label-width="100px"
        label-position="left">
        <el-form-item label="内容" prop="content">
          <el-input v-model="form.content" placeholder="请输入内容" clearable :style="{width: '100%'}"></el-input>
        </el-form-item>
        <el-form-item label="时间" prop="date">
          <el-date-picker v-model="form.date" format="yyyy-MM-dd" value-format="yyyy-MM-dd"
            :style="{width: '100%'}" placeholder="请选择时间" clearable></el-date-picker>
        </el-form-item>
      </el-form>
      <div slot="footer">
        <el-button @click="close">取消</el-button>
        <el-button type="primary" @click="handelConfirm">确定</el-button>
      </div>
    </el-dialog>
  </div>
</template>
<script>
export default {
  inheritAttrs: false,
  components: {},
  props: [
  isShowDialog:{
    type:Boolean,
    default:true
  }

  ],
  data() {
    return {
      form: {
        content: undefined,
        date: '2023-02-07',
      },
      rules: {
        content: [],
        date: [],
      },
    }
  },
  computed: {},
  watch: {},
  created() {},
  mounted() {},
  methods: {
    onOpen() {},
    onClose() {
      this.$refs['formRef'].resetFields()
    },
    close() {
      this.$emit('update:isShowDialog', false)
    },
    handelConfirm() {
      this.$refs['formRef'].validate(valid => {
        if (!valid) return
        this.close()
      })
    },
  }
}

</script>
<style>
</style>
